// FindXSqrt.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <iostream.h>


int main(int argc, char* argv[])
{
	int a;
	float x = 1,temp;

	cout<<"Please enter a integer: ";
	cin>>a;

	do{
		temp = x;

		x = (x + a/x)/2;
	} while(((x - temp)>0.001) || ((temp - x) >0.001));

	cout<<"The sqart of "<<a<<" is "<<x<<endl;


	return 0;
}

